Drag & Drop PDFs, MP4s, and COPY PASTE image files#137
Open
Alani25 wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You can drag and drop PDFs & MP4s to open them the same way you can open a wick file by dragging it into the editor, which is sometimes far faster than needing to manually click the "open" button then searching for the file to open.
Also, you can now copy-paste images directly from your clipboard to the editor.
Pasted images will automatically be added to the asset library and placed where the cursor is located. The added image asset is then automatically "copied" so that the next time the user pastes, it pastes the same image from the asset library rather than re-importing it.
When the user copies an object inside of the project, that object is then pasted rather than the image. If the user then copies an image, that image is what's to be pasted until another image/ wick object is copied.
Whatever was copied last is what gets pasted.
How can the editor tell what was copied last?
Whenever the user uses the paste or copy feature in candlestick, the current clipboard is saved within the window's local storage as a stamp "finger print." If the current clipboard has an image in it, but that image doesn't match the saved fingerprint, then we upload the image into the asset library then copy the image wick object that is added to the project from that copy-paste. That way, the next time the user pastes, it'd paste the uploaded image rather than upload a new image. When the copy feature is used to copy wick elements, we fingerprint the current clipboard to make sure it's ignored. If the clipboard changes than what was stamped, then we know that the user copied an image after the copied wick object. The reason i save the fingerprint on the window's local storage is to make sure that users are still able to use copy/ paste features between multiple projects in multiple windows without issue.
It may be a bit confusing to explain it, but to put it simply this feature should work as "expected."
Testing would be appreciated.